package com.sangcomz.fishbun.ui.picker.model;

import ohos.utils.net.Uri;

abstract public class PickerListItem {

    abstract public long getItemId();

//    public static PickerListItem Camera = new PickerListItem() {
//        @Override
//        public long getItemId() {
//            return 0;
//        }
//    };

    public static class Image extends PickerListItem {

        private Uri imageUri;
        private int selectedIndex;
        private PickerViewData viewData;

        public Image(Uri imageUri, int selectedIndex, PickerViewData viewData) {
            this.imageUri = imageUri;
            this.selectedIndex = selectedIndex;
            this.viewData = viewData;
        }

        public Image(Uri uri, PickerViewData viewData) {
            this(uri, -1, viewData);
        }

        @Override
        public long getItemId() {
            return imageUri.hashCode();
        }

        public Uri getImageUri() {
            return imageUri;
        }

        public void setImageUri(Uri imageUri) {
            this.imageUri = imageUri;
        }

        public int getSelectedIndex() {
            return selectedIndex;
        }

        public void setSelectedIndex(int selectedIndex) {
            this.selectedIndex = selectedIndex;
        }

        public PickerViewData getViewData() {
            return viewData;
        }

        public void setViewData(PickerViewData viewData) {
            this.viewData = viewData;
        }
    }
}


